<template>
    <el-form ref="companySearchForm" :model="companySearch" label-width="100px" :inline="true" size="small">
        <el-form-item label="企业名称" prop="companyName">
            <el-input v-model="companySearch.companyName"></el-input>
        </el-form-item>
        <el-form-item label="负责人" prop="leader">
            <el-input v-model="companySearch.leader"></el-input>
        </el-form-item>
        <el-form-item label="联系电话" prop="phone">
            <el-input v-model="companySearch.leader"></el-input>
        </el-form-item>
        <el-form-item label="审核状态" prop="registerType">
            <el-select v-model="companySearch.registerType" placeholder="审核状态">
                <el-option label="待审核" value="AUDIT_WAIT" />
                <el-option label="审核成功" value="AUDIT_SUCCESS" />
                <el-option label="审核失败" value="AUDIT_FAIL" />
            </el-select>
        </el-form-item>
        <el-form-item class="btn">
            <el-button type="primary" icon="el-icon-search" @click="onSearch">搜索</el-button>
            <el-button icon="el-icon-refresh" @click="reset">重置</el-button>
        </el-form-item>
    </el-form>
</template>
  
<script>
export default {
    props: {
        companySearch: {
            type: Object,
            required: true,
        },
    },
    methods: {
        onSearch() {
            this.$emit("onSearch");
        },
        reset() {
            this.$refs.companySearchForm.resetFields();
        }
    },
    beforeDestroy() {
        this.$refs.companySearchForm.resetFields();
    }
};
</script>
  
<style scoped lang="scss">
.el-button {
    padding-left: 25px;
    padding-right: 30px;
}

.btn {
    margin-left: 30px;
}
</style>
  